/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.sys.service.business;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.thinkgem.jeesite.common.persistence.Page;
import com.thinkgem.jeesite.common.service.CrudService;
import com.thinkgem.jeesite.modules.sys.entity.business.Business;
import com.thinkgem.jeesite.modules.sys.dao.business.BusinessDao;

/**
 * businessService
 * @author jin
 * @version 2018-04-10
 */
@Service
@Transactional(readOnly = true)
public class BusinessService extends CrudService<BusinessDao, Business> {

	public Business get(String id) {
		return super.get(id);
	}
	
	public List<Business> findList(Business business) {
		return super.findList(business);
	}
	
	public Page<Business> findPage(Page<Business> page, Business business) {
		business.getSqlMap().put("dsf", dataScopeFilter(business.getCurrentUser(), "", "o2"));
		return super.findPage(page, business);
	}

	public Page<Business> findPage2(Page<Business> page, Business business) {
		business.getSqlMap().put("dsf", dataScopeFilter(business.getCurrentUser(), "", "o2"));
		return super.findPage2(page, business);
	}

	public Page<Business> findPage3(Page<Business> page, Business business) {
		business.getSqlMap().put("dsf", dataScopeFilter(business.getCurrentUser(), "", "o2"));
		return super.findPage3(page, business);
	}
	
	@Transactional(readOnly = false)
	public void save(Business business) {
		super.save(business);
	}
	
	@Transactional(readOnly = false)
	public void delete(Business business) {
		super.delete(business);
	}


	public List<Map<String,Object>> kfTj(String kfId){
		return dao.kfTj(kfId);
	}

	public List<Business> getAll(){
		return dao.getAll();
	}



	
}